package com.spic.system.api;

import com.spic.common.core.constant.ServiceNameConstants;
import com.spic.common.core.domain.R;
import com.spic.common.core.web.domain.AjaxResult;
import com.spic.system.api.domain.SysNoticeInfo;
import com.spic.system.api.factory.RemoteNoticeInfoFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author yangjie
 * @create 2021-11-05 16:04
 */
@FeignClient(contextId = "remoteNoticeInfoService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteNoticeInfoFallbackFactory.class)
public interface RemoteNoticeInfoService {
    /**
     * 新增系统消息
     * title    标题
     * content  内容
     * userId   接收者
     *
     * @return
     */
    @PostMapping("/noticeinfo")
    public R<AjaxResult> add(@RequestBody SysNoticeInfo sysNoticeInfo);
}
